# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-math-random-isaac
pkgver=1.004
pkgrel=9
pkgdesc='Perl interface to the ISAAC PRNG algorithm'
arch=('any')
url='https://search.cpan.org/dist/Math-Random-ISAAC/'
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-test-nowarnings')
options=(!emptydirs)
source=("https://search.cpan.org/CPAN/authors/id/J/JA/JAWNSY/Math-Random-ISAAC-$pkgver.tar.gz")
md5sums=('46110b9a7bb96fe641bdfaf35bdafec5')

build() {
  cd "$srcdir/Math-Random-ISAAC-$pkgver"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'" \
    PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
    MODULEBUILDRC=/dev/null
  perl Makefile.PL
  make
}

check() {
  cd "$srcdir/Math-Random-ISAAC-$pkgver"
  make test
}

package() {
  cd "$srcdir/Math-Random-ISAAC-$pkgver"
  make install
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
